# class Solution:
#     def twoSum(self, nums: List[int], target: int) -> List[int]:
#         llen = len(nums)
#         for i in range(llen):
#             val = target - nums[i]
#             for j in range(i + 1, llen):
#                 if nums[j] == val:
#                     return [i, j]

class Solution:
    def twoSum(self, nums, target):
        llen = len(nums)
        for i in range(llen):
            val = target - nums[i]
            for j in range(i + 1, llen):
                if nums[j] == val:
                    return [i, j]

nums = [2, 7, 11, 15]
target = 9

res = Solution().twoSum(nums, target)
print(res)
